import request from '@/utils/request'

export default {
	supplierQuery: (data, isLoading = true) => { //供应商列表
		return request({
			url: '/system/mall/supplier/query',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},
	supplierDelete: (data, isLoading = true) => { //供应商删除
		return request({
			url: '/system/mall/supplier/del',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},
	supplierSaveUpd: (data, isLoading = true) => { //供应商添加
		return request({
			url: '/system/mall/supplier/save',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},
	userQuery: (data, isLoading = true) => { //管理员列表
		return request({
			url: '/system/mall/supplier/user/query',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},
	userDelete: (data, isLoading = true) => { //删除管理员
		return request({
			url: '/system/mall/supplier/user/delete',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},
	addUser: (data, isLoading = true) => { //添加管理员
		return request({
			url: '/system/mall/supplier/user/addUser',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},
	checkRepeatPhone: (data, isLoading = true) => { //校验门店管理员手机号是否重复
		return request({
			url: '/system/mall/supplier/user/checkRepeatPhone',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},
	resetpass: (data, isLoading = true) => { //重置门店管理员密码
		return request({
			url: '/system/mall/supplier/user/resetpass',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},
	getSupplierData: (data, isLoading = true) => { //下拉框供应商
		return request({
			url: '/system/mall/supplier/getSupplierData',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},
	loadAllXiaoQu: (data, isLoading = true) => { //获取小区下拉框数据
		return request({
			url: '/system/xiaoqu/loadAllXiaoQu',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},

}
